package com.iterator.mapper.web.marketManager;


import com.iterator.bean.web.pojo.dhy.RoleThreeLevel;
import com.iterator.bean.web.pojo.dhy.RoleThreeLevelExample;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

public interface RoleThreeLevelMapper {
    long countByExample(RoleThreeLevelExample example);

    int deleteByExample(RoleThreeLevelExample example);

    int deleteByPrimaryKey(String id);

    int insert(RoleThreeLevel record);

    int insertSelective(RoleThreeLevel record);

    List<RoleThreeLevel> selectByExample(RoleThreeLevelExample example);

    RoleThreeLevel selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") RoleThreeLevel record, @Param("example") RoleThreeLevelExample example);

    int updateByExample(@Param("record") RoleThreeLevel record, @Param("example") RoleThreeLevelExample example);

    int updateByPrimaryKeySelective(RoleThreeLevel record);

    int updateByPrimaryKey(RoleThreeLevel record);

    //查询关系表
    List<String> selectThreeLevelIdByRoleId(Integer id);

    //删除关系表中之前的对应关系
    void deleteOldInfo(int roleId);

    //添加新的对应关系
    void insertNewInfo(@Param("permission") String permission, @Param("roleId") int roleId);

    //查询授权信息
    List<String> selectPermissionsByRoleIds(ArrayList<Integer> integers);
}